﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AccessLogCleaner.Logs
{
    public abstract class Log : ILog
    {
        protected string _logName;

        public delegate void LogProgressUpdated(object sender, LogProgressUpdatedEventArgs e);
        public delegate void LogProgressCompleted(object sender, LogProgressCompletedEventArgs e);

        public event LogProgressUpdated OnProgressUpdated;
        public event LogProgressCompleted OnProgressCompleted;

        protected Log(string logFile)
        {
            _logName = logFile;
        }

        #region ILog Implementation

        public abstract void Split(int numLines, SplitOptions opt);
        public abstract void Split(string filter, SplitOptions opt);
        public abstract void Serialize(System.IO.Stream stream);
        public abstract void Serialize(string filename);
        public abstract void Sanitize(string filter, SanitizeOptions opt);
        public abstract void Sanitize(System.Text.RegularExpressions.Regex filter, SanitizeOptions opt);

        public abstract string LogFileName
        {
            get;
            set;
        }

        public abstract string LogFileLongName
        {
            get;
            set;
        }

        public abstract float FractionCompleted
        {
            get;
            set;
        }

        public abstract float PercentCompleted
        {
            get;
            set;
        }
 
        #endregion
    }
}
